how to convert string of dict to dict in python